package com.ibeeking.found.msg.rest.service;

import javax.mail.MessagingException;
import java.security.GeneralSecurityException;
import java.util.List;
import java.util.Map;

/**
 * @ClassName ISendEmailService
 * @Description 发送模板邮件
 * @Author ibeeking
 * @Date 2020-12-10 9:21
 **/
public interface ISendEmailService {

    /**
     * 发送简单邮件
     *
     * @param toUser
     * @param subject
     * @param content
     * @return
     * @throws MessagingException
     * @throws GeneralSecurityException
     */
    Boolean sendSimpleEmail(String tenantId, List<String> toUser, String subject, String content) throws MessagingException, GeneralSecurityException;

    /**
     * 发送模板邮件
     *
     * @param templateCode
     * @param toUser
     * @param templateData
     * @return
     */
    Boolean sendTemplateEmail(String tenantId, String templateCode, List<String> toUser, Map<String, String> templateData) throws MessagingException, GeneralSecurityException;
}
